<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NINJA: BinaryHeap Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NINJA
   &#160;<span id="projectnumber">2.x</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_binary_heap.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="class_binary_heap-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">BinaryHeap Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_binary_heap_8hpp_source.html">BinaryHeap.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7869a94b091c236c876f2446d7e51b66"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a7869a94b091c236c876f2446d7e51b66">BinaryHeap</a> ()</td></tr>
<tr class="separator:a7869a94b091c236c876f2446d7e51b66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76c28aef539ff1601b0b830ff2a9b4c6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a76c28aef539ff1601b0b830ff2a9b4c6">BinaryHeap</a> (int maxCapacity)</td></tr>
<tr class="separator:a76c28aef539ff1601b0b830ff2a9b4c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a638bc159331b0cfead10a2a985be9584"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a638bc159331b0cfead10a2a985be9584">BinaryHeap</a> (const int *val1s, <a class="el" href="struct_int.html">Int</a> keys)</td></tr>
<tr class="separator:a638bc159331b0cfead10a2a985be9584"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af844e5c0554576ba4d33f58d149455e7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#af844e5c0554576ba4d33f58d149455e7">BinaryHeap</a> (const int *val1s, <a class="el" href="struct_int.html">Int</a> keys, int maxCapacity)</td></tr>
<tr class="separator:af844e5c0554576ba4d33f58d149455e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bfd6a2f831b7d4282be2ec3838f0af5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a0bfd6a2f831b7d4282be2ec3838f0af5">~BinaryHeap</a> ()</td></tr>
<tr class="separator:a0bfd6a2f831b7d4282be2ec3838f0af5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a903e4bbeaa9ca7cb7baa5a22730cd45a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a903e4bbeaa9ca7cb7baa5a22730cd45a">size</a> () const</td></tr>
<tr class="separator:a903e4bbeaa9ca7cb7baa5a22730cd45a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a146554bd398e659498861fcfbcafd645"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a146554bd398e659498861fcfbcafd645">insert</a> (int val1, int key) const</td></tr>
<tr class="separator:a146554bd398e659498861fcfbcafd645"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37e19e8dadb4e66fb148fed5b56aa86e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a37e19e8dadb4e66fb148fed5b56aa86e">deleteMin</a> () const</td></tr>
<tr class="separator:a37e19e8dadb4e66fb148fed5b56aa86e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41ac81a66982236c6b0428b3f0bf14cf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a41ac81a66982236c6b0428b3f0bf14cf">isEmpty</a> () const</td></tr>
<tr class="separator:a41ac81a66982236c6b0428b3f0bf14cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1d3eb2f5b4fdddcd0d4f0eda4a74ebe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#ae1d3eb2f5b4fdddcd0d4f0eda4a74ebe">makeEmpty</a> () const</td></tr>
<tr class="separator:ae1d3eb2f5b4fdddcd0d4f0eda4a74ebe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a176296b32feaa157c1d6896ba89f7227"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a176296b32feaa157c1d6896ba89f7227">binHeapTest</a> (bool verbose)</td></tr>
<tr class="separator:a176296b32feaa157c1d6896ba89f7227"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a33a4606314cb615739fd7fef8c8b4d10"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::pair&lt; int, int &gt; &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a33a4606314cb615739fd7fef8c8b4d10">heap</a></td></tr>
<tr class="separator:a33a4606314cb615739fd7fef8c8b4d10"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a0801f4b699bbca28d880f10c37e6abee"><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_binary_heap.html#a0801f4b699bbca28d880f10c37e6abee">DEFAULT_CAPACITY</a> = 1000</td></tr>
<tr class="separator:a0801f4b699bbca28d880f10c37e6abee"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a7869a94b091c236c876f2446d7e51b66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7869a94b091c236c876f2446d7e51b66">&#9670;&nbsp;</a></span>BinaryHeap() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BinaryHeap::BinaryHeap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a76c28aef539ff1601b0b830ff2a9b4c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76c28aef539ff1601b0b830ff2a9b4c6">&#9670;&nbsp;</a></span>BinaryHeap() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BinaryHeap::BinaryHeap </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxCapacity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a638bc159331b0cfead10a2a985be9584"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a638bc159331b0cfead10a2a985be9584">&#9670;&nbsp;</a></span>BinaryHeap() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BinaryHeap::BinaryHeap </td>
          <td>(</td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>val1s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_int.html">Int</a>&#160;</td>
          <td class="paramname"><em>keys</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="af844e5c0554576ba4d33f58d149455e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af844e5c0554576ba4d33f58d149455e7">&#9670;&nbsp;</a></span>BinaryHeap() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BinaryHeap::BinaryHeap </td>
          <td>(</td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>val1s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_int.html">Int</a>&#160;</td>
          <td class="paramname"><em>keys</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxCapacity</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a0bfd6a2f831b7d4282be2ec3838f0af5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bfd6a2f831b7d4282be2ec3838f0af5">&#9670;&nbsp;</a></span>~BinaryHeap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BinaryHeap::~BinaryHeap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a176296b32feaa157c1d6896ba89f7227"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a176296b32feaa157c1d6896ba89f7227">&#9670;&nbsp;</a></span>binHeapTest()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool BinaryHeap::binHeapTest </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>verbose</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a37e19e8dadb4e66fb148fed5b56aa86e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37e19e8dadb4e66fb148fed5b56aa86e">&#9670;&nbsp;</a></span>deleteMin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BinaryHeap::deleteMin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a146554bd398e659498861fcfbcafd645"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a146554bd398e659498861fcfbcafd645">&#9670;&nbsp;</a></span>insert()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BinaryHeap::insert </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>val1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a41ac81a66982236c6b0428b3f0bf14cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41ac81a66982236c6b0428b3f0bf14cf">&#9670;&nbsp;</a></span>isEmpty()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool BinaryHeap::isEmpty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae1d3eb2f5b4fdddcd0d4f0eda4a74ebe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1d3eb2f5b4fdddcd0d4f0eda4a74ebe">&#9670;&nbsp;</a></span>makeEmpty()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BinaryHeap::makeEmpty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a903e4bbeaa9ca7cb7baa5a22730cd45a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a903e4bbeaa9ca7cb7baa5a22730cd45a">&#9670;&nbsp;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BinaryHeap::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a0801f4b699bbca28d880f10c37e6abee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0801f4b699bbca28d880f10c37e6abee">&#9670;&nbsp;</a></span>DEFAULT_CAPACITY</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const int BinaryHeap::DEFAULT_CAPACITY = 1000</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a33a4606314cb615739fd7fef8c8b4d10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33a4606314cb615739fd7fef8c8b4d10">&#9670;&nbsp;</a></span>heap</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;std::pair&lt;int, int&gt; &gt;* BinaryHeap::heap</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>NINJA/<a class="el" href="_binary_heap_8hpp_source.html">BinaryHeap.hpp</a></li>
<li>NINJA/<a class="el" href="_binary_heap_8cpp.html">BinaryHeap.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_binary_heap.html">BinaryHeap</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
  </ul>
</div>
</body>
</html>
